import 'dart:convert';

import 'package:enterprise_v6_app/app/data/entities/task/process_vetting_config_entity.dart';
import 'package:enterprise_v6_app/generated/json/base/json_field.dart';
import 'package:enterprise_v6_app/generated/json/process_vetting_entity.g.dart';

export 'package:enterprise_v6_app/generated/json/process_vetting_entity.g.dart';

@JsonSerializable()
class ProcessVettingEntity {
  ProcessVettingEntity();
  factory ProcessVettingEntity.fromJson(Map<String, dynamic> json) => $ProcessVettingEntityFromJson(json);

  List<ProcessVettingHead>? head;
  // List<Map<String, ProcessVettingData>>? data;
  List<dynamic>? data;

  Map<String, dynamic> toJson() => $ProcessVettingEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class ProcessVettingHead {
  ProcessVettingHead();
  factory ProcessVettingHead.fromJson(Map<String, dynamic> json) => $ProcessVettingHeadFromJson(json);

  String? label;
  String? field;
  String? type;
  ProcessVettingConfigEntity? config;

  Map<String, dynamic> toJson() => $ProcessVettingHeadToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}

@JsonSerializable()
class ProcessVettingData {
  ProcessVettingData();
  factory ProcessVettingData.fromJson(Map<String, dynamic> json) => $ProcessVettingDataFromJson(json);

  String? value;
  String? id;
  String? processId;
  String? dictionaryTableId;

  Map<String, dynamic> toJson() => $ProcessVettingDataToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }
}
